<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/head.jsp"%>

<!DOCTYPE HTML>
<html>
<head>
</head>
<body style="">
<div class="fr fontblack mt15 mb20 mr20">
	 <div class="fr next mr20 mb10">
    <span class="fl" style="line-height: 30px;">共<span class="fontpink">${PageBean.recordscount}</span>条记录</span>
    <c:if test="${PageBean.pagecount > 0}">
      <c:if test="${PageBean.currentpage==1}">
        <a href="javascript:;">上一页</a>
      </c:if>
      <c:if test="${PageBean.currentpage>1}">
        <a href="${param.url}p=${PageBean.currentpage-1}&pz=${PageBean.pagesize}">上一页</a>
      </c:if>
      <a href="${param.url}p=1&pz=${PageBean.pagesize}"
        style="${PageBean.currentpage == 1 ? 'background: #f7f7f7; color: #fd6002;' : ''}">1</a>
      <c:if test="${PageBean.currentpage-1 > 3}">
        <span class="fl">...</span>
        <a href="${param.url}p=${PageBean.currentpage - 2}&pz=${PageBean.pagesize}">${PageBean.currentpage - 2}</a>
        <a href="${param.url}p=${PageBean.currentpage - 1}&pz=${PageBean.pagesize}">${PageBean.currentpage - 1}</a>
      </c:if>
      <c:if test="${PageBean.currentpage > 1 && PageBean.currentpage - 1 <= 3}">
      
        <c:forEach begin="1" end="${PageBean.currentpage - 2}" var="i" step="1">
           <a href="${param.url}p=${i+1}&pz=${PageBean.pagesize}">${i+1}</a>
  </c:forEach>
      </c:if>
      <c:if test="${PageBean.currentpage > 1 && PageBean.currentpage < PageBean.pagecount}">
        <a href="${param.url}p=${PageBean.currentpage}&pz=${PageBean.pagesize}" style="background: #f7f7f7; color: #fd6002;">${PageBean.currentpage}</a>
      </c:if>
      <c:if test="${PageBean.pagecount - PageBean.currentpage > 3}">
        <a href="${param.url}p=${PageBean.currentpage + 1}&pz=${PageBean.pagesize}">${PageBean.currentpage + 1}</a>
        <a href="${param.url}p=${PageBean.currentpage + 2}&pz=${PageBean.pagesize}">${PageBean.currentpage + 2}</a>
        <span class="fl">...</span>
      </c:if>
      <c:if test="${PageBean.pagecount > PageBean.currentpage && PageBean.pagecount - PageBean.currentpage <= 3}">
        <c:forEach end="${PageBean.pagecount - PageBean.currentpage - 1}" begin="1" var="i">
          <a href="${param.url}p=${PageBean.currentpage + i}&pz=${PageBean.pagesize}">${PageBean.currentpage + i}</a>
        </c:forEach>
      </c:if>
      <c:if test="${PageBean.pagecount >= PageBean.currentpage && PageBean.pagecount != 1}">
        <a href="${param.url}p=${PageBean.pagecount}&pz=${PageBean.pagesize}"
          style="${PageBean.currentpage == PageBean.pagecount ? 'background: #f7f7f7; color: #fd6002;' : ''}">${PageBean.pagecount}</a>
      </c:if>
      <c:if test="${PageBean.currentpage == PageBean.pagecount}">
        <a href="javascript:;">下一页</a>
      </c:if>
      <c:if test="${PageBean.currentpage < PageBean.pagecount}">
        <a href="${param.url}p=${PageBean.currentpage + 1}&pz=${PageBean.pagesize}">下一页</a>
      </c:if>
      <span class="fl page_text">&nbsp;到 &nbsp;</span>
      <input onkeyup="this.value=this.value.replace(/\D/g, '');checkPageInput(this, ${PageBean.pagecount});" name="inputPage" maxlength="10" class="input-text lh5" style="text-align: center;width:50px;float:left;">
      <span class="fl page_text">&nbsp;页&nbsp;</span>
    </c:if>    

      <c:choose>
        <c:when test="${PageBean.pagecount>0}">
                <input type="button" value="确定" onclick="location.href='${param.url}p=' + $(this).prev().prev().val() + '&pz=${PageBean.pagesize}';" class="ext_btn ext_btn_submit">
                
        </c:when>
      </c:choose>
  </div>
  
	</div>
           
</body>
</html>
